// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
using Stride.Core.Diagnostics;

namespace Stride.Core.Assets;

/// <summary>
/// Result returned when loading a session using <see cref="PackageSession.Load(string, PackageLoadParameters)"/>
/// </summary>
public sealed class PackageSessionResult : LoggerResult
{
    /// <summary>
    /// Gets or sets the loaded session.
    /// </summary>
    /// <value>The session.</value>
    public PackageSession Session { get; internal set; }

    /// <summary>
    /// Gets or sets whether the operation has been cancelled by user.
    /// </summary>
    public bool OperationCancelled { get; set; }

    /// <inheritdoc/>
    public override void Clear()
    {
        base.Clear();
        Session = null;
    }
}
